test for consistency of equation by matrix method